<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>医疗机构</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<script src="js/shengshi.js" type="text/javascript"></script>
		<script charset="utf-8" src="front/kindeditor.js"></script>
			<SCRIPT LANGUAGE=JavaScript> 
var s=["s1","s2"]; 
var opt0 = ["请选择","请选择"]; 
function setup() 
{ 
for(i=0;i<s.length-1;i++) 
document.getElementById(s[i]).onchange=new Function("change("+(i+1)+")"); 
change(0); 
} 
//联动菜单结束
</SCRIPT>
		<script>
			KE.show({
				id : 'detaildesc',
				shadowMode : false,
				autoSetDataMode: false,
				syncType : '', 
				allowPreviewEmoticons : false,
				afterCreate : function(id) {
					KE.event.add(KE.$('example'), 'submit', function() {
						KE.sync(id);
					});
				}
			});
		</script>
	<script type="text/javascript">
		function checkIcon(){
			var icon = $("#favicon").val();
			var n = icon.lastIndexOf(".");
			var a = icon.substr(n);
			alert(icon);
			if(a != ".ico"){
				alert("不支持该格式");
			}
		}
		function checkLogo(){
			var logo = $("#logo").val();
			var n = logo.lastIndexOf(".");
			var a = logo.substr(n);
			alert(a);
			if(a != ".jpg"&& a !=".jpeg" && a !=".gif" && a !=".png" && a !=".bmp" ){
				alert("不支持该格式");
			}
		}
	</script>
	<style type="text/css">
	<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}

.STYLE1 {
	font-size: 12px
}

.STYLE3 {
	font-size: 12px;
	font-weight: bold;
}

.STYLE4 {
	color: #03515d;
	font-size: 12px;
}
-->
.boxBorder {
	border: 1px solid green;
}


#addlink,#addlinkb, #addlinkj,#addlinkjb{
	position: absolute;
	width: 400px;
	left: 50%;
	top: 50%;
	margin-left: -200px;
	height: auto;
	z-index: 100;
	background-color: #fff;
	border: 1px #8FA4F5 solid;
	padding: 1px;
}

#addlink h2,#addlinkb h2,#addlinkj h2,#addlinkjb h2{
	height: 25px;
	font-size: 14px;
	background-color:#7bc4d3;
	position: relative;
	padding-left: 10px;
	line-height: 25px;
	color: white;
}

#addlink h2 a,#addlinkj h2 a,#addlinkb h2 a,#addlinkjb h2 a{
	position: absolute;
	right: 5px;
	font-size: 12px;
	color: white;
}

#addlink .form,#addlinkb .jb ,#addlinkj .kb ,#addlinkjb .forms {
	padding-left: 10px;
}

</style>
	</head>
	<body>
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td height="30" background="backstage/tab/images//tab_05.gif">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="12" height="30">
								<img src="backstage/tab/images//tab_03.gif" width="12"
									height="30" />
							</td>
							<td>
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="46%" valign="middle">
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0">
												<tr>
													<td width="5%">
														<div align="center">
															<img src="backstage/tab/images//tb.gif" width="16"
																height="16" />
														</div>
													</td>
													<td width="95%" class="STYLE1">
														<span class="STYLE3">你当前的位置</span>：[系统中心]-[医疗机构管理]-[新增/编辑医疗机构]
													</td>
												</tr>
											</table>
										</td>
										<td width="54%">
											<table border="0" align="right" cellpadding="0"
												cellspacing="0">
												<tr>
													<td width="100">
														<table width="87%" border="0" cellpadding="0"
															cellspacing="0">
															<tr>
															<td colspan="2" nowrap="nowrap"><a href=""><font size="2" color="black"><span style="cursor:pointer;">【添加医疗机构】</span></font></a></td>
															</tr>
														</table>
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
							<td width="16">
								<img src="backstage/tab/images//tab_07.gif" width="16"
									height="30" />
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr>
				<td>
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td width="8" background="backstage/tab/images//tab_12.gif">
								&nbsp;
							</td>
							<td>
							<c:if test="${message != null}">
								<table width="100%">
									<tr style="background-color: #87CEFF">
										<td align="center" valign="center" height="30">
											<div>${message}</div>
										</td>
									</tr>
								</table>
							</c:if>
								<c:set var="action" value="${param.action eq 'edit' ? 'medical.do?method=updateMedical' :'medical.do?method=saveMedical'  }"></c:set>
								<form action="${action }" method="post" name="example" id="example">
								<input type="hidden" name="bean.id" value="${mi.id }">
								<table width="80%" border="0" cellpadding="0" cellspacing="1"
									bgcolor="b5d6e6" onmouseover="changeto()" onmouseout="changeback()">
										<tr>
											<td height="25" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">医疗机构名称</span>
												</div>
											</td>
											<td height="25" bgcolor="#FFFFFF">
												<input type="text" name="bean.name" id="name" value="${empty param.bean.name ? mi.name:param.bean.name }" maxlength="50">
											</td>
											<td bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">服务范围</span>
												</div>
											</td>
											<td bgcolor="#FFFFFF">
												<input type="text" name="bean.serverLimit" id="servletLimit" maxlength="50" value="${empty param.bean.serverLimit ? mi.serverLimit:param.bean.serverLimit }">
											</td>
										</tr>
										<tr>
											<td height="25" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">类型</span>
												</div>
											</td>
											<td height="25" bgcolor="#FFFFFF">
											   <c:set var="ctype" value="${param.bean.type == '' ? mi.type:param.bean.type}" />
												<select name="bean.type" id="type">
													<option value="1" <c:if test="${ctype eq '1' }">selected="selected"</c:if>>医院</option>
													<option value="2" <c:if test="${ctype eq '2' }">selected="selected"</c:if>>社康站</option>
													<option value="3" <c:if test="${ctype eq '3' }">selected="selected"</c:if>>专科医院</option>
													<option value="4" <c:if test="${ctype eq '4' }">selected="selected"</c:if>>其他医疗机构</option>
												</select>
											</td>
											<td bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">省市区\县</span>
												</div>
											</td>
											<td bgcolor="#FFFFFF">
										     	<select name="bean.province" id="s1">
													<option></option>
												</select>
												<select name="bean.city" id="s2">
													<option></option>
												</select>
												<div id="citytip" style="color: red; display: inline" ></div>
												<input type="hidden" name="hs1" id="hs1" value="${mi.province }">
												<input type="hidden" name="hs2" id="hs2" value="${mi.city }">
											</td>
										</tr>
										<tr>
											<td height="25" bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">详细地址</span>
												</div>
											</td>
											<td height="25" bgcolor="#FFFFFF">
												<input type="text" name="bean.detailAddr" id="detailAddr" maxlength="100" value="${empty param.bean.detailAddr ? mi.detailAddr :param.bean.detailAddr }">  	
											</td>
											<td bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">电话</span>
												</div>
											</td>
											<td bgcolor="#FFFFFF">
												<input type="text" name="bean.phone" id="phone" value="${empty param.bean.phone ? mi.phone: param.bean.phone}" maxlength="20">
											</td>
										</tr>
										<tr>
											<td bgcolor="#FFFFFF">
												<div align="center">
													<span class="STYLE1">详细信息</span>
												</div>
											</td>
											<td colspan="3">
												<textarea id="detaildesc" name="bean.detaildesc" style="width:700px;height:200px;visibility:hidden;">${empty param.bean.detaildesc ?mi.detaildesc:param.bean.detaildesc }</textarea>
											</td>
										</tr>
										<tr>
											<td  colspan="4" align="center">
												<input type="submit" name="sb" value="保存">
											</td>
										</tr>
								</table>
								</form>
							</td>
							<td width="8"
								background="backstage/tab/backstage/tab/images///tab_15.gif">
								&nbsp;
							</td>
						</tr>
					</table>
				</td>
			</tr>
</table>
	</body>
			<SCRIPT language="javascript"> 
setup();
if('${param.action}' == 'edit'){
	var pro = document.getElementById("hs1").value;
	var city = document.getElementById("hs2").value;
	document.getElementById("s1").value=pro;
	change(1); 
	document.getElementById("s2").value=city;
}
</SCRIPT>
</html>
